Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only write receipts once on PersistenceService::save_blocks #9976

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

joshieDo
Copy link
Collaborator

@joshieDo joshieDo commented Aug 1, 2024

StateWriter::write_to_storage implemented by StorageWriter already writes receipts to storage

@joshieDo joshieDo added C-bug An unexpected or incorrect behavior A-db Related to the database labels Aug 1, 2024
Comment on lines +135 to +145
let mut storage_writer = if provider_rw.prune_modes_ref().has_receipts_pruning() {
StorageWriter::new(Some(provider_rw), None)
} else {
StorageWriter::new(
Some(provider_rw),
Some(
static_file_provider
.get_writer(first_block.number, StaticFileSegment::Receipts)?,
),
)
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once this save_blocks gets moved to StorageWriter, this will get abstracted away

@joshieDo joshieDo added this pull request to the merge queue Aug 1, 2024
Merged via the queue into main with commit 3c2759d Aug 1, 2024
33 checks passed
@joshieDo joshieDo deleted the joshie/saveblocks branch August 1, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants